# -*- coding: utf-8 -*-
# @File: backend => hands.py
# @CreateTime: 2025/8/25 21:35
# @Author: EvanZhang
# @Info: 每一局牌

from tortoise import fields, models

# id | room_id | board_cards | pot_size | finished_at
class Hand(models.Model):
    id = fields.IntField(pk=True)
    room = fields.ForeignKeyField('models.Room', related_name="hands", description="所属房间")
    board_cards = fields.CharField(max_length=50, description="公共牌，逗号分隔")
    pot_size = fields.IntField(description="奖池大小")
    finished_at = fields.DatetimeField(null=True, description="结束时间")

    class Meta:
        table = "hands"
        description = "每一局牌表"